import App from '../App'

const comment = r => require.ensure([], () => r(require('../page/theme/Comment.vue')), 'comment')
const account = r => require.ensure([], () => r(require('../page/theme/account.vue')), 'account')
const themeList = r => require.ensure([], () => r(require('../page/theme/themeList.vue')), 'themeList')
const login = r => require.ensure([], () => r(require('../page/login/login')), 'login')
const loginReward = r => require.ensure([], () => r(require('../page/login/reward_login.vue')), 'login')





export default [{
    path: '/',
    component: App, //顶层路由，对应index.html
    children: [ //二级路由。对应App.vue
        //地址为空时跳转home页面
        {
            path: '',
            redirect: '/themeList'
        },
        //帖子列表
        {
          path: '/themeList',
          component: themeList
        },
        //评论页面
        {
            path: '/comment/:themeId',
            component: comment
        },//账户页面
        {
            path: '/account',
            component: account
        },
        //登录注册页
        {
            path: '/login',
            component: login
        },
        //打赏未登录进入的登录注册页
        {
            path: '/login_reward',
            component: loginReward
        }

    ]
}]
